/* Redux可视化工具样式 */
.redux-visualizer {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  color: #333;
}

.redux-visualizer h2 {
  text-align: center;
  color: #2563eb;
  margin-bottom: 30px;
  font-size: 28px;
}

.redux-visualizer h3 {
  color: #1e40af;
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 22px;
}

.redux-visualizer h4 {
  color: #3b82f6;
  margin-top: 15px;
  margin-bottom: 10px;
  font-size: 18px;
}

/* 配置面板 */
.config-panel {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.config-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
}

/* 状态面板 */
.state-panel {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.state-content pre {
  background-color: #0f172a;
  color: #e2e8f0;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 14px;
}

/* Action分发面板 */
.action-panel {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.action-group {
  margin-bottom: 20px;
}

.action-group:last-child {
  margin-bottom: 0;
}

.action-group button {
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 15px;
  margin-right: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.action-group button:hover {
  background-color: #2563eb;
}

.action-group input[type="text"] {
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  margin-right: 10px;
  width: 250px;
  font-size: 14px;
}

/* Todo列表 */
.todo-panel {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.todo-panel ul {
  list-style-type: none;
  padding: 0;
}

.todo-panel li {
  background-color: white;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e2e8f0;
}

.todo-panel button {
  background-color: #ef4444;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
}

.todo-panel button:hover {
  background-color: #dc2626;
}

/* 历史记录面板 */
.history-panel {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.history-header button {
  background-color: #64748b;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}

.history-header button:hover {
  background-color: #475569;
}

.history-content {
  max-height: 300px;
  overflow-y: auto;
}

.history-content ul {
  list-style-type: none;
  padding: 0;
}

.history-content li {
  background-color: white;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 1px solid #e2e8f0;
}

.history-time {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 5px;
}

.history-action {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 14px;
  color: #1e40af;
}

/* 流程图解 */
.flow-diagram {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  overflow-x: auto;
}

.flow-content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  min-width: max-content;
}

.flow-node {
  background-color: white;
  border: 2px solid #10b981;
  border-radius: 8px;
  padding: 15px;
  min-width: 150px;
  text-align: center;
}

.node-title {
  font-weight: bold;
  color: #059669;
  margin-bottom: 5px;
}

.node-desc {
  font-size: 12px;
  color: #1e3a8a;
  font-family: 'Consolas', 'Monaco', monospace;
  word-break: break-all;
}

.flow-arrow {
  font-size: 24px;
  color: #059669;
  font-weight: bold;
}

/* 核心概念说明 */
.concepts-panel {
  background-color: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 8px;
  padding: 20px;
}

.concept-item {
  margin-bottom: 15px;
  padding: 15px;
  background-color: white;
  border-radius: 6px;
  border: 1px solid #f3e8ff;
}

.concept-item:last-child {
  margin-bottom: 0;
}

.concept-item p {
  margin: 0;
  line-height: 1.5;
  color: #4b5563;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .redux-visualizer {
    padding: 15px;
  }
  
  .config-panel {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .action-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .action-group input[type="text"] {
    width: 100%;
    margin-right: 0;
  }
  
  .action-group button {
    margin-right: 0;
    width: 100%;
  }
  
  .flow-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .flow-arrow {
    transform: rotate(90deg);
  }
  
  .flow-node {
    width: 100%;
    min-width: unset;
  }
}